package com.order.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.order.common.R;
import com.order.po.b_size;
import com.order.po.user;
import com.order.service.userService;
@Controller
public class userController {
	 @Autowired
	  private userService userService;
	 
	 @RequestMapping({"/getAlluser"})
	   @ResponseBody
	   public List getAlluser()
	   {
	     return this.userService.getAlluser();
	   }
	 
	 @RequestMapping({"/get_byuserid"})
	   @ResponseBody
	   public List get_byuserid(String parameter)
	   {
	     return this.userService.get_byuserid(parameter);
	   }
	 
	 @RequestMapping({"/delete_user"})
	   @ResponseBody
	   public void delete_user(String user_id)
	   {
	      this.userService.delete_user(user_id);
	   }
	 
	 @RequestMapping({"/update_user"})
	   	@ResponseBody
	   public void update_user(user u)
	   {
	     this.userService.update_user(u);
	   }
	 
	 @RequestMapping({ "/insert_user" })
		@ResponseBody
		public R insert_user(user u) {
			return this.userService.insert_user(u);
		 }
	 
}
